﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace Classroom_Learning_Partner.Converters
{
    public class EnumToBoolConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return value != null && value.Equals(parameter); }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return value.Equals(true) ? parameter : null; }
    }
}